<template>
  <p>car: {{ car }}</p>
  <button @click="updateCar">updateCar</button>
  <br />
  <hr />
</template>
<script setup lang="ts">
import { inject } from "vue";
/* 默认值 */
let { car, updateCar } = inject("carContext", {
  car: "默认",
  updateCar: () => {},
});
</script>
<style lang="scss" scoped></style>
